Films as Graphical Comments in the Source Code of Programs

نویسنده

  • Hanspeter Mössenböck
چکیده

We suggest to use animated pictures (films) as graphical comments in the source code of programs. Such pictures can be played forwards and backwards in steps under the control of the user. They can have multiple branches, which lead to different pictures. Animation effects can be applied to show how a picture changes over time. This can be useful for visualizing the dynamic behavior of programs. We show how to extend an object-oriented graphics editor so that it can be used for creating and viewing films. We also explain how such films can be embedded into the source code of programs using a text framework. 1. Motivation Program editors are rather conservative tools. While general purpose text processing systems exploit fonts, colors or pictures to make documents more readable, most program editors are just able to handle plain ASCII text. Although some more advanced editors use fonts and colors to highlight keywords or comments, it is still quite unusual to have pictures in the source code. This is surprising since many aspects of a program can be much better described with a picture than with a textual comment (e.g., data structures, class hierarchies, message sequences, etc.). In fact, many programmers do draw pictures when they design a program. These drawings are, however, often discarded when the implementation is done because they cannot be integrated into the program text. Of course pictures could be kept in a separate file (the documentation) and referenced from the source code. However, experience shows that such external documentation is less useful because it is not ready at hand and tends to get outdated when the source code is modified. We therefore recommend to store pictures directly in the source code. Such pictures can serve as graphical comments and often speak for a thousand words. In this paper we not only suggest to have (static) pictures embedded in the source code but even go a step further by suggesting animated pictures which can be viewed like films. The problem with programs is that their behavior is dynamic while a picture shows just a static snapshot. For example, when we want to describe how a data structure is changed by a process, we have to draw several snapshots (Fig. 1). It would be much more illustrative to show the effect of the process in a single picture using animation. BP BP BP SP SP SP BP SP return adr. return adr. return adr. old BP old BP call P save BP create new frame Fig. 1 Snapshots that show the stack manipulation during a procedure call

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Audiovisual Programs As Sources Of Language Input: An Overview

Audiovisual devices such as satellite and conventional televisions can offer easy access to authentic programs which are considered to be a rich source of language input for SLA (Second Language Acquisition). The immediacy of various audiovisual programs ensures that language learners’ exposure is up-to-date and embedded in the real world of native speakers. In the same line, in the present pap...

متن کامل

Audiovisual Programs As Sources Of Language Input: An Overview

Audiovisual devices such as satellite and conventional televisions can offer easy access to authentic programs which are considered to be a rich source of language input for SLA (Second Language Acquisition). The immediacy of various audiovisual programs ensures that language learners’ exposure is up-to-date and embedded in the real world of native speakers. In the same line, in the present pap...

متن کامل

Evaluating Comment-to-ast Assignment Heuristics for C++ Programs

Comments are integral part of the source code of software. They preserve the intentions of the developers, document constraints and highlight implementation details. Good comments help us to understand the codebase and make maintenance easier. Most of the software tools ignore comments because they take no part in code generation. However, there are cases when comments should be taken into acco...

متن کامل

Measurement of Complexity and Comprehension of a Program Through a Cognitive Approach

The inherent complexity of the software systems creates problems in the software engineering industry. Numerous techniques have been designed to comprehend the fundamental characteristics of software systems. To understand the software, it is necessary to know about the complexity level of the source code. Cognitive informatics perform an important role for better understanding the complexity o...

متن کامل

Novel silicon dioxide -based nanocomposites as an antimicrobial in poly (lactic acid) nanocomposites films

Objective(s): Due to nanocomposites antimicrobial properties, one of the most extensive usages of nano-products is in packing industry. Thus, the production of packages with nanotechnology can effectively prevent against a variety of microorganisms. In this study, the silicon dioxide nanoparticles the poly (lactic acid) PLA films on antimicrobial and permeability was investigated. Methods...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1997